import useCommonStore from "@/store/common"
import type { Params } from "@/types/common"
import { $baseApi } from "@/utils/http-instance"

const commonStore = useCommonStore()
//线路列表
export const $getTripList = (params: Params) =>
	$baseApi.get(`regions/${commonStore.region_id}/trip-spu-sales/list-all-of-retail`, params)

export const $getTripDetail = (id: string, params: any) => $baseApi.get(`trip-spu-sales/get-of-retail/${id}`, params)

export const $getTripListPrice = (id: string, start_date: string, end_date: string) =>
	$baseApi.get(`trip-sku-sales/list-price-of-retail/${id}`, { start_date, end_date })

export const $getTripSales = (id: string) => $baseApi.get(`trip-sku-sales/get-of-retail/${id}`)

export const $createTrip = (params: any) => $baseApi.post(`hy-order-bills/shop-create-trip`, params)
